package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @RestController注解相当于@ResponseBody ＋ @Controller合在一起的作用。
 */
@RestController
@RequestMapping(value = "/index")
public class IndexController {
	
	@RequestMapping
	public String index() {
		return "hello world";
	}
	
}
